package com.thinkgem.jeesite.modules.sys.utils;

import com.thinkgem.jeesite.modules.sys.entity.User;

/**
 * Created by admin on 2017-12-5.
 */
public class MobileUserContext {

    private static ThreadLocal<User> threadLocal = new ThreadLocal<User>();

    public static void set(User user) {
        threadLocal.set(user);
    }

    public static User get() {
        return threadLocal.get();
    }

    public static void clear() {
        threadLocal.remove();
    }

}
